package com.starblink.android.basic.widget.drawer

import android.content.Context
import android.util.AttributeSet
import androidx.drawerlayout.widget.DrawerLayout

class MeasureDrawerLayout @JvmOverloads constructor(
    context: Context,
    attrs: AttributeSet? = null,
    defStyleRes: Int = 0,
) : DrawerLayout(context, attrs, defStyleRes) {


    override fun onMeasure(widthMeasureSpec: Int, heightMeasureSpec: Int) {
        val nWidthMeasureSpec = MeasureSpec.makeMeasureSpec(
            MeasureSpec.getSize(widthMeasureSpec), MeasureSpec.EXACTLY)
        val nHeightMeasureSpec = MeasureSpec.makeMeasureSpec(
            MeasureSpec.getSize(heightMeasureSpec), MeasureSpec.EXACTLY)
        super.onMeasure(nWidthMeasureSpec, nHeightMeasureSpec)
    }

}